#include <iostream>

using namespace std;

class Shape
{
public:
    Shape(int x,int y)
        :_x(x),_y(y){}
    virtual void show()
    {
        cout<<"Draw shape:";
        cout<<"_x = "<<_x<<",_y = "<<_y<<endl;
    }
protected:
    int _x;
    int _y;
};

class Circle:public Shape
{
public:
    Circle(int x,int y,int r)
        :Shape(x,y),_r(r){}
    virtual void show()
    {
        cout<<"Draw Circle:";
        cout<<"_x="<<_x<<",_y ="<<_y<<",_r = "<<_r<<endl;
    }
private:
    int _r;
};

class Rect:public Shape
{
public:
    Rect(int x,int y,int l,int w)
        :Shape(x,y),_len(l),_wid(w){}
    virtual void show()
    {
        cout<<"Draw Rect:";
        cout<<"_x = "<<_x<<",_y = "<<_y<<",_len = "<<_len<<",_wid = "<<_wid<<endl;
    }
protected:
    int _len;
    int _wid;
};
int main()
{
    Shape s(1,2);
    s.show();

    Circle c(4,5,6);
    c.show();

    Rect r(11,22,33,44);
    r.show();

    Shape *ps;
    int choice;
    while(1)
    {
        cin>>choice;
        switch(choice)
        {
            case 1:
                ps = &c;
                ps->show();
                break;
            case 2:
                ps = &r;
                ps->show();
                break;
            default:
                break;
        }
    }
    return 0;

}
